package com.cskaoyan.controller;

import com.cskaoyan.bean.data.PageData;
import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.model.MarketIssue;
import com.cskaoyan.service.IssueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("wx/issue")
public class WxIssueController {
    @Autowired
    IssueService issueService;
    @GetMapping("list")
    public BaseRespVo list(Integer page, Integer limit) {
        List<MarketIssue> issueList = issueService.list(page, limit);
        PageData pageData = PageData.list(issueList);
        return BaseRespVo.ok(pageData);
    }
}
